package codelifes.clms.ui;

import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.layout.TreeColumnLayout;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.part.ViewPart;

public class Navigator extends ViewPart {

    public static final String ID = "codelifes.clms.ui.views.Navigator"; //$NON-NLS-1$

    public Navigator() {
    }

    /**
     * Create contents of the view part.
     * 
     * @param parent
     */
    @Override
    public void createPartControl(Composite parent) {
        Composite container = new Composite(parent, SWT.NONE);
        container.setLayout(new FormLayout());
        {
            Composite composite = new Composite(container, SWT.NONE);
            composite.setLayout(new TreeColumnLayout());
            FormData fd_composite = new FormData();
            fd_composite.bottom = new FormAttachment(0, 469);
            fd_composite.right = new FormAttachment(0, 594);
            fd_composite.top = new FormAttachment(0);
            fd_composite.left = new FormAttachment(0);
            composite.setLayoutData(fd_composite);
            {
                Tree tree = new Tree(composite, SWT.BORDER);
                tree.setHeaderVisible(true);
                tree.setLinesVisible(true);
            }
        }

        createActions();
        initializeToolBar();
        initializeMenu();
    }

    /**
     * Create the actions.
     */
    private void createActions() {
        // Create the actions
    }

    /**
     * Initialize the toolbar.
     */
    private void initializeToolBar() {
        IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
    }

    /**
     * Initialize the menu.
     */
    private void initializeMenu() {
        IMenuManager menuManager = getViewSite().getActionBars().getMenuManager();
    }

    @Override
    public void setFocus() {
        // Set the focus
    }
}
